#include "BulletCollision/Gimpact/btGenericPoolAllocator.h"
#ifdef __cplusplus
extern "C" {
#endif
btGenericPoolAllocator* bullet_NewbtGenericPoolAllocator(unsigned long long pool_element_size,unsigned long long pool_element_count){
	size_t c_arg_pool_element_size=pool_element_size;
	size_t c_arg_pool_element_count=pool_element_count;
	btGenericPoolAllocator* wrap_out = new btGenericPoolAllocator(c_arg_pool_element_size,c_arg_pool_element_count);
	return wrap_out;
}

void* bullet_btGenericPoolAllocator_allocate(btGenericPoolAllocator* c_this,unsigned long long size_bytes){
	size_t c_arg_size_bytes=size_bytes;
	void * c_out = c_this->allocate(c_arg_size_bytes);
	void* wrap_out = (void*)(void*)(c_out);
	return wrap_out;
}

bool bullet_btGenericPoolAllocator_freeMemory(btGenericPoolAllocator* c_this,void* pointer){
	void * c_arg_pointer=(void *)(void*)(pointer);
	bool c_out = c_this->freeMemory(c_arg_pointer);
	bool wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericPoolAllocator_get_pool_capacity(btGenericPoolAllocator* c_this){
	size_t c_out = c_this->get_pool_capacity();
	unsigned long long wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericPoolAllocator_GetFieldOfM_pool_count(btGenericPoolAllocator* c_this){
	return (unsigned long long)(c_this->m_pool_count);
}

btGenericMemoryPool* bullet_NewbtGenericMemoryPool(unsigned long long element_size,unsigned long long element_count){
	size_t c_arg_element_size=element_size;
	size_t c_arg_element_count=element_count;
	btGenericMemoryPool* wrap_out = new btGenericMemoryPool(c_arg_element_size,c_arg_element_count);
	return wrap_out;
}

void* bullet_btGenericMemoryPool_allocate(btGenericMemoryPool* c_this,unsigned long long size_bytes){
	size_t c_arg_size_bytes=size_bytes;
	void * c_out = c_this->allocate(c_arg_size_bytes);
	void* wrap_out = (void*)(void*)(c_out);
	return wrap_out;
}

void bullet_btGenericMemoryPool_end_pool(btGenericMemoryPool* c_this){
	c_this->end_pool();
}

bool bullet_btGenericMemoryPool_freeMemory(btGenericMemoryPool* c_this,void* pointer){
	void * c_arg_pointer=(void *)(void*)(pointer);
	bool c_out = c_this->freeMemory(c_arg_pointer);
	bool wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericMemoryPool_gem_element_size(btGenericMemoryPool* c_this){
	size_t c_out = c_this->gem_element_size();
	unsigned long long wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericMemoryPool_get_allocated_count(btGenericMemoryPool* c_this){
	size_t c_out = c_this->get_allocated_count();
	unsigned long long wrap_out = (c_out);
	return wrap_out;
}

void* bullet_btGenericMemoryPool_get_element_data(btGenericMemoryPool* c_this,unsigned long long element_index){
	size_t c_arg_element_index=element_index;
	void * c_out = c_this->get_element_data(c_arg_element_index);
	void* wrap_out = (void*)(void*)(c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericMemoryPool_get_free_positions_count(btGenericMemoryPool* c_this){
	size_t c_out = c_this->get_free_positions_count();
	unsigned long long wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericMemoryPool_get_max_element_count(btGenericMemoryPool* c_this){
	size_t c_out = c_this->get_max_element_count();
	unsigned long long wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericMemoryPool_get_pool_capacity(btGenericMemoryPool* c_this){
	size_t c_out = c_this->get_pool_capacity();
	unsigned long long wrap_out = (c_out);
	return wrap_out;
}

unsigned long long bullet_btGenericMemoryPool_GetFieldOfM_allocated_count(btGenericMemoryPool* c_this){
	return (unsigned long long)(c_this->m_allocated_count);
}

unsigned long long** bullet_btGenericMemoryPool_GetFieldOfM_allocated_sizes(btGenericMemoryPool* c_this){
	return (unsigned long long**)(&c_this->m_allocated_sizes);
}

unsigned long long** bullet_btGenericMemoryPool_GetFieldOfM_free_nodes(btGenericMemoryPool* c_this){
	return (unsigned long long**)(&c_this->m_free_nodes);
}

unsigned long long bullet_btGenericMemoryPool_GetFieldOfM_free_nodes_count(btGenericMemoryPool* c_this){
	return (unsigned long long)(c_this->m_free_nodes_count);
}

unsigned char** bullet_btGenericMemoryPool_GetFieldOfM_pool(btGenericMemoryPool* c_this){
	return (unsigned char**)(&c_this->m_pool);
}

void bullet_btGenericMemoryPool_init_pool(btGenericMemoryPool* c_this,unsigned long long element_size,unsigned long long element_count){
	size_t c_arg_element_size=element_size;
	size_t c_arg_element_count=element_count;
	c_this->init_pool(c_arg_element_size,c_arg_element_count);
}

#ifdef __cplusplus
}
#endif
